var express = require('express');
var router = express.Router();


router.get('/createLedger', function (req, res, next) {
  createLedger(req.params.l);
})

router.get('/repoToTransfer', function (req, res, next) {
  repoToTransfer(req.params.l);
})

router.get('/readAssets', function (req, res, next) {
  readAssets(req.params.l);
})

router.get('/transferToDestination', function (req, res, next) {
  transferToDestination(req.params.l);
})

router.get('/destinationToBuyer', function (req, res, next) {
  destinationToBuyer(req.params.l);
})

module.exports = router;

/*【使用方法】
public static void main(String[] args) {
  //调用fabricAPI中createLedger函数
  HttpRequest.sendGet("http://127.0.0.1:3000/call_fabric/createLedger", "l=xxx");

  HttpRequest.sendGet("http://127.0.0.1:3000/call_fabric/repoToTransfer", "l=xxx");

  HttpRequest.sendGet("http://127.0.0.1:3000/call_fabric/readAssets", "l=xxx");

  HttpRequest.sendGet("http://127.0.0.1:3000/call_fabric/transferToDestination", "l=xxx");

  HttpRequest.sendGet("http://127.0.0.1:3000/call_fabric/destinationToBuyer", "l=xxx");
  
}
*/